Integrand size = 29, antiderivative size = 83 \[ \int \frac {\sin ^2(c+d x) \tan ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {x}{a}+\frac {\cos (c+d x)}{a d}+\frac {2 \sec (c+d x)}{a d}-\frac {\sec ^3(c+d x)}{3 a d}-\frac {\tan (c+d x)}{a d}+\frac {\tan ^3(c+d x)}{3 a d} \]
x/a+cos(d*x+c)/a/d+2*sec(d*x+c)/a/d-1/3*sec(d*x+c)^3/a/d-tan(d*x+c)/a/d+1/ 3*tan(d*x+c)^3/a/d
Time = 0.86 (sec) , antiderivative size = 148, normalized size of antiderivative = 1.78 \[ \int \frac {\sin ^2(c+d x) \tan ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {18+2 (-11+6 c+6 d x) \cos (c+d x)+14 \cos (2 (c+d x))+11 \sin (c+d x)-11 \sin (2 (c+d x))+6 c \sin (2 (c+d x))+6 d x \sin (2 (c+d x))+3 \sin (3 (c+d x))}{12 a d \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right ) (1+\sin (c+d x))} \]
(18 + 2*(-11 + 6*c + 6*d*x)*Cos[c + d*x] + 14*Cos[2*(c + d*x)] + 11*Sin[c + d*x] - 11*Sin[2*(c + d*x)] + 6*c*Sin[2*(c + d*x)] + 6*d*x*Sin[2*(c + d*x )] + 3*Sin[3*(c + d*x)])/(12*a*d*(Cos[(c + d*x)/2] - Sin[(c + d*x)/2])*(Co s[(c + d*x)/2] + Sin[(c + d*x)/2])*(1 + Sin[c + d*x]))
Time = 0.46 (sec) , antiderivative size = 67, normalized size of antiderivative = 0.81, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.345, Rules used = {3042, 3318, 3042, 3070, 244, 2009, 3954, 3042, 3954, 24}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sin ^2(c+d x) \tan ^2(c+d x)}{a \sin (c+d x)+a} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin (c+d x)^4}{\cos (c+d x)^2 (a \sin (c+d x)+a)}dx\) |
\(\Big \downarrow \) 3318 |
\(\displaystyle \frac {\int \tan ^4(c+d x)dx}{a}-\frac {\int \sin (c+d x) \tan ^4(c+d x)dx}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \tan (c+d x)^4dx}{a}-\frac {\int \sin (c+d x) \tan (c+d x)^4dx}{a}\) |
\(\Big \downarrow \) 3070 |
\(\displaystyle \frac {\int \tan (c+d x)^4dx}{a}+\frac {\int \left (1-\cos ^2(c+d x)\right )^2 \sec ^4(c+d x)d\cos (c+d x)}{a d}\) |
\(\Big \downarrow \) 244 |
\(\displaystyle \frac {\int \tan (c+d x)^4dx}{a}+\frac {\int \left (\sec ^4(c+d x)-2 \sec ^2(c+d x)+1\right )d\cos (c+d x)}{a d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\int \tan (c+d x)^4dx}{a}+\frac {\cos (c+d x)-\frac {1}{3} \sec ^3(c+d x)+2 \sec (c+d x)}{a d}\) |
\(\Big \downarrow \) 3954 |
\(\displaystyle \frac {\frac {\tan ^3(c+d x)}{3 d}-\int \tan ^2(c+d x)dx}{a}+\frac {\cos (c+d x)-\frac {1}{3} \sec ^3(c+d x)+2 \sec (c+d x)}{a d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\tan ^3(c+d x)}{3 d}-\int \tan (c+d x)^2dx}{a}+\frac {\cos (c+d x)-\frac {1}{3} \sec ^3(c+d x)+2 \sec (c+d x)}{a d}\) |
\(\Big \downarrow \) 3954 |
\(\displaystyle \frac {\int 1dx+\frac {\tan ^3(c+d x)}{3 d}-\frac {\tan (c+d x)}{d}}{a}+\frac {\cos (c+d x)-\frac {1}{3} \sec ^3(c+d x)+2 \sec (c+d x)}{a d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {\frac {\tan ^3(c+d x)}{3 d}-\frac {\tan (c+d x)}{d}+x}{a}+\frac {\cos (c+d x)-\frac {1}{3} \sec ^3(c+d x)+2 \sec (c+d x)}{a d}\) |
(Cos[c + d*x] + 2*Sec[c + d*x] - Sec[c + d*x]^3/3)/(a*d) + (x - Tan[c + d* x]/d + Tan[c + d*x]^3/(3*d))/a
3.8.72.3.1 Defintions of rubi rules used
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[Expand Integrand[(c*x)^m*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, m}, x] && IGtQ[p , 0]
Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*tan[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Simp[-f^(-1) Subst[Int[(1 - x^2)^((m + n - 1)/2)/x^n, x], x, Cos[e + f *x]], x] /; FreeQ[{e, f}, x] && IntegersQ[m, n, (m + n - 1)/2]
Int[((cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^( n_.))/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[g^2/a Int [(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^n, x], x] - Simp[g^2/(b*d) Int [(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0]
Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b*((b*Tan[c + d *x])^(n - 1)/(d*(n - 1))), x] - Simp[b^2 Int[(b*Tan[c + d*x])^(n - 2), x] , x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]
Time = 0.33 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.18
method | result | size |
parallelrisch | \(\frac {\left (6 d x +16\right ) \cos \left (3 d x +3 c \right )+18 d x \cos \left (d x +c \right )+48 \cos \left (d x +c \right )+36 \cos \left (2 d x +2 c \right )+3 \cos \left (4 d x +4 c \right )-8 \sin \left (3 d x +3 c \right )+25}{6 a d \left (\cos \left (3 d x +3 c \right )+3 \cos \left (d x +c \right )\right )}\) | \(98\) |
derivativedivides | \(\frac {-\frac {1}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {32}{16+16 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {2}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {1}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {5}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}}{d a}\) | \(99\) |
default | \(\frac {-\frac {1}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {32}{16+16 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {2}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {1}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {5}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}}{d a}\) | \(99\) |
risch | \(\frac {x}{a}+\frac {{\mathrm e}^{i \left (d x +c \right )}}{2 a d}+\frac {{\mathrm e}^{-i \left (d x +c \right )}}{2 a d}+\frac {\frac {4 \,{\mathrm e}^{i \left (d x +c \right )}}{3}+4 i {\mathrm e}^{2 i \left (d x +c \right )}+4 \,{\mathrm e}^{3 i \left (d x +c \right )}+\frac {8 i}{3}}{\left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{3} d a}\) | \(112\) |
norman | \(\frac {\frac {x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {x}{a}+\frac {8 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d a}-\frac {2 x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a}-\frac {2 x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {2 x \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {2 x \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {2 x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {2 x \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {16}{3 a d}+\frac {2 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}+\frac {4 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}+\frac {10 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d a}-\frac {20 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d a}-\frac {22 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d a}-\frac {26 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{3 d a}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}\) | \(305\) |
1/6*((6*d*x+16)*cos(3*d*x+3*c)+18*d*x*cos(d*x+c)+48*cos(d*x+c)+36*cos(2*d* x+2*c)+3*cos(4*d*x+4*c)-8*sin(3*d*x+3*c)+25)/a/d/(cos(3*d*x+3*c)+3*cos(d*x +c))
Time = 0.26 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.96 \[ \int \frac {\sin ^2(c+d x) \tan ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {3 \, d x \cos \left (d x + c\right ) + 7 \, \cos \left (d x + c\right )^{2} + {\left (3 \, d x \cos \left (d x + c\right ) + 3 \, \cos \left (d x + c\right )^{2} + 2\right )} \sin \left (d x + c\right ) + 1}{3 \, {\left (a d \cos \left (d x + c\right ) \sin \left (d x + c\right ) + a d \cos \left (d x + c\right )\right )}} \]
1/3*(3*d*x*cos(d*x + c) + 7*cos(d*x + c)^2 + (3*d*x*cos(d*x + c) + 3*cos(d *x + c)^2 + 2)*sin(d*x + c) + 1)/(a*d*cos(d*x + c)*sin(d*x + c) + a*d*cos( d*x + c))
\[ \int \frac {\sin ^2(c+d x) \tan ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\int \frac {\sin ^{4}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx}{a} \]
Leaf count of result is larger than twice the leaf count of optimal. 236 vs. \(2 (79) = 158\).
Time = 0.29 (sec) , antiderivative size = 236, normalized size of antiderivative = 2.84 \[ \int \frac {\sin ^2(c+d x) \tan ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {2 \, {\left (\frac {\frac {13 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {2 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {2 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {6 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {3 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + 8}{a + \frac {2 \, a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {a \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {2 \, a \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {a \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}}} + \frac {3 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a}\right )}}{3 \, d} \]
2/3*((13*sin(d*x + c)/(cos(d*x + c) + 1) + 2*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 2*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 - 6*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 - 3*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 + 8)/(a + 2*a*sin(d*x + c)/(cos(d*x + c) + 1) + a*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - a*sin(d *x + c)^4/(cos(d*x + c) + 1)^4 - 2*a*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 - a*sin(d*x + c)^6/(cos(d*x + c) + 1)^6) + 3*arctan(sin(d*x + c)/(cos(d*x + c) + 1))/a)/d
Time = 0.34 (sec) , antiderivative size = 125, normalized size of antiderivative = 1.51 \[ \int \frac {\sin ^2(c+d x) \tan ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\frac {6 \, {\left (d x + c\right )}}{a} - \frac {3 \, {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 4 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 5\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )} a} + \frac {15 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 36 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 17}{a {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}^{3}}}{6 \, d} \]
1/6*(6*(d*x + c)/a - 3*(tan(1/2*d*x + 1/2*c)^2 - 4*tan(1/2*d*x + 1/2*c) + 5)/((tan(1/2*d*x + 1/2*c)^3 - tan(1/2*d*x + 1/2*c)^2 + tan(1/2*d*x + 1/2*c ) - 1)*a) + (15*tan(1/2*d*x + 1/2*c)^2 + 36*tan(1/2*d*x + 1/2*c) + 17)/(a* (tan(1/2*d*x + 1/2*c) + 1)^3))/d
Time = 14.31 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.55 \[ \int \frac {\sin ^2(c+d x) \tan ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {x}{a}-\frac {-2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-\frac {4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{3}+\frac {4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{3}+\frac {26\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{3}+\frac {16}{3}}{a\,d\,{\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )}^3\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )} \]